package com.dms.modules.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("product_sku")
@ApiModel(value = "ProductSku", description = "商品SKU信息")
public class ProductSku {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("SKU ID")
    private Long id;
    
    @ApiModelProperty("商品ID")
    private Long productId;
    
    @ApiModelProperty("SKU编码")
    private String skuCode;
    
    @ApiModelProperty("SKU名称")
    private String skuName;
    
    @ApiModelProperty("规格值JSON")
    private String specValues;
    
    @ApiModelProperty("SKU图片")
    private String image;
    
    @ApiModelProperty("售价")
    private BigDecimal price;
    
    @ApiModelProperty("库存")
    private Integer stock;
    
    @ApiModelProperty("销量")
    private Integer sales;
    
    @ApiModelProperty("状态：0-禁用 1-启用")
    private Integer status;
    
    @ApiModelProperty("锁定库存（下单未支付锁定的库存）")
    private Integer lockStock;
    
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    
    @TableLogic
    @ApiModelProperty("是否删除：0-未删除 1-已删除")
    private Integer deleted;
} 